home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Patches / 3.3Patch.LibrariesOK.post_install < prev    next >
Text File  |  1996-04-17  |  1KB  |  67 lines

  1. #!/bin/sh
  2. # 3.3Intel68kPatch.post_install
  3. # 3.3HPPASPARCPatch.post_install
  4. #
  5. # This script will edit the /private/etc/rc and /usr/template/client/etc/rc
  6. # files adding the "-R" flag to the lookupd command. This will force the
  7. # lookupd command to use the old (pre-patch) behavior which means you don't
  8. # get the lookupd / DNS  improvements but your statically linked (e.g. POSIX)
  9. # and profiled executables will continue to run as expected.
  10. #
  11. # Allan Nathanson, NeXT Computer, 27 September 1995
  12.  
  13. #
  14. # Files to be updated.
  15. #
  16. RC1="/private/etc/rc"
  17. RC2="/usr/template/client/etc/rc"
  18.  
  19. #
  20. # Check that any files which must exist are actually present.
  21. #
  22. for f in ${RC1} ${RC2}
  23. do
  24.     if [ ! -f ${f} ]; then
  25.         echo "FAILED (The original file, ${f}, does not exist)"
  26.         exit 1
  27.     fi
  28. done
  29.  
  30. #
  31. # Make the Installer.app log look nice!
  32. #
  33. echo ""
  34.  
  35. #
  36. # Save copies of files which are present before package installation.
  37. #
  38. for f in ${RC1} ${RC2}
  39. do
  40.     if [ -f ${f}.NS33 ]; then
  41.         echo "        Original version of ${f} already exists."
  42.     else
  43.         /bin/echo -n "        Saving original version of ${f} ... "
  44.         /bin/cp -p ${f} ${f}.NS33
  45.         echo "OK."
  46.     fi
  47. done
  48.  
  49. #
  50. # Start "lookupd" with the "-R" flag.
  51. #
  52. for f in ${RC1} ${RC2}
  53. do
  54.     echo -n "        Updating ${f} ... "
  55.     /bin/cp ${f} /tmp/rc.$$
  56.     /bin/sed -e 's|/usr/etc/lookupd \&\&|/usr/etc/lookupd -R \&\&|' /tmp/rc.$$ > ${f}
  57.     /bin/rm -f /tmp/rc.$$
  58.     echo "OK."
  59. done
  60.  
  61. #
  62. # Make the package installation log look nice!
  63. #
  64. echo "    ... done."
  65.  
  66. exit 0
  67.